<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <link rel="stylesheet" type="text/css" href="../css/register.css" />
</head>
<body>
<h3>注册新用户</h3>
<div>
    <form th:action="@{/registerSubmit}">
        <label th:for="accountId">平台账户</label>
        <input th:type="text" th:id="accountId" th:name="account" placeholder="请输入您的账户">

        <label th:for="usernameId">姓名</label>
        <input th:type="text" th:id="usernameId" th:name="username" placeholder="请输入您的姓名">

        <label th:for="passwordId">密码</label>
        <input th:type="password" th:id="passwordId" th:name="password" placeholder="请输入您的密码">

        <label th:for="passwordAgainId">密码确认</label>
        <input th:type="password" th:id="passwordAgainId" th:name="passwordAgain" th:onblur="check2pwd()" placeholder="请确认您的密码">

        <label th:for="departmentId">系统</label>
        <select th:id="departmentId" th:name="department">
            <option value="">请选择您的系统</option>
            <option value="0">手机app</option>
            <option value="1">审批</option>
            <option value="2">信审</option>
        </select>

        <input type="submit" value="Submit">
    </form>
</div>
</body>
</html>

<script>
    function check2pwd() {
        if(passwordId.value != passwordAgainId.value) {
            alert("两次输入密码不一致！")
            passwordId.value = "";
            passwordAgainId.value = "";
        }
    }
</script>